/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.company.regis.db.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 *
 * @author totoland
 */
@Entity
public class ViewUserDetail implements Serializable{
    private static final long serialVersionUID = 5378468160024014460L;
    
    /***
     * SELECT REG_USER.USER_ID,
  REG_USER.USER_NAME,
  REG_USER.USER_PASSWORD,
  REG_USER.FIRST_NAME,
  REG_USER.LAST_NAME,
  REG_USER.GENDER,
  REG_USER.USER_GROUP,
  REG_ADDRESS.PROVINCE_ID,
  REG_ADDRESS.AMPHUR_ID,
  AMPHUR.AMPHUR_NAME,
  REG_ADDRESS.TUMBOL_ID,
  PROVINCE.PROVINCE_NAME,
  DISTRICT.DISTRICT_NAME
FROM REG_USER
INNER JOIN REG_ADDRESS
ON REG_USER.USER_ID = REG_ADDRESS.USER_ID
LEFT JOIN PROVINCE
ON REG_ADDRESS.PROVINCE_ID = PROVINCE.PROVINCE_ID
LEFT JOIN AMPHUR
ON REG_ADDRESS.AMPHUR_ID = AMPHUR.AMPHUR_ID
LEFT JOIN DISTRICT
ON REG_ADDRESS.TUMBOL_ID = DISTRICT.DISTRICT_ID
     */
    
    @Id
    @Column(name = "USER_ID")
    private String userId;
    @Column(name = "USER_NAME")
    private String userName;
    @Column(name = "USER_PASSWORD")
    private String userPassword;
    @Column(name = "FIRST_NAME")
    private String firstName;
    @Column(name = "LAST_NAME")
    private String lastName;
    @Column(name = "GENDER")
    private String gender;
    @Column(name = "USER_GROUP")
    private String userGroup;
    @Column(name = "PROVINCE_ID")
    private String provinceId;
    @Column(name = "AMPHUR_ID")
    private String amphurId;
    @Column(name = "TUMBOL_ID")
    private String districtId;
    @Column(name = "PROVINCE_NAME")
    private String provinceName;
    @Column(name ="AMPHUR_NAME")
    private String amphurName;
    @Column(name = "DISTRICT_NAME")
    private String districtName;

    /**
     * @return the userId
     */
    public String getUserId() {
        return userId;
    }

    /**
     * @param userId the userId to set
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }

    /**
     * @return the userName
     */
    public String getUserName() {
        return userName;
    }

    /**
     * @param userName the userName to set
     */
    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * @return the userPassword
     */
    public String getUserPassword() {
        return userPassword;
    }

    /**
     * @param userPassword the userPassword to set
     */
    public void setUserPassword(String userPassword) {
        this.userPassword = userPassword;
    }

    /**
     * @return the firstName
     */
    public String getFirstName() {
        return firstName;
    }

    /**
     * @param firstName the firstName to set
     */
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    /**
     * @return the lastName
     */
    public String getLastName() {
        return lastName;
    }

    /**
     * @param lastName the lastName to set
     */
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    /**
     * @return the gender
     */
    public String getGender() {
        return gender;
    }

    /**
     * @param gender the gender to set
     */
    public void setGender(String gender) {
        this.gender = gender;
    }

    /**
     * @return the userGroup
     */
    public String getUserGroup() {
        return userGroup;
    }

    /**
     * @param userGroup the userGroup to set
     */
    public void setUserGroup(String userGroup) {
        this.userGroup = userGroup;
    }

    /**
     * @return the provinceId
     */
    public String getProvinceId() {
        return provinceId;
    }

    /**
     * @param provinceId the provinceId to set
     */
    public void setProvinceId(String provinceId) {
        this.provinceId = provinceId;
    }

    /**
     * @return the amphurId
     */
    public String getAmphurId() {
        return amphurId;
    }

    /**
     * @param amphurId the amphurId to set
     */
    public void setAmphurId(String amphurId) {
        this.amphurId = amphurId;
    }

    /**
     * @return the districtId
     */
    public String getDistrictId() {
        return districtId;
    }

    /**
     * @param districtId the districtId to set
     */
    public void setDistrictId(String districtId) {
        this.districtId = districtId;
    }

    /**
     * @return the provinceName
     */
    public String getProvinceName() {
        return provinceName;
    }

    /**
     * @param provinceName the provinceName to set
     */
    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    /**
     * @return the amphurName
     */
    public String getAmphurName() {
        return amphurName;
    }

    /**
     * @param amphurName the amphurName to set
     */
    public void setAmphurName(String amphurName) {
        this.amphurName = amphurName;
    }

    /**
     * @return the districtName
     */
    public String getDistrictName() {
        return districtName;
    }

    /**
     * @param districtName the districtName to set
     */
    public void setDistrictName(String districtName) {
        this.districtName = districtName;
    }

    @Override
    public String toString() {
        return "ViewUserDetail{" + "userId=" + userId + ", userName=" + userName + ", userPassword=" + userPassword + ", firstName=" + firstName + ", lastName=" + lastName + ", gender=" + gender + ", userGroup=" + userGroup + ", provinceId=" + provinceId + ", amphurId=" + amphurId + ", districtId=" + districtId + ", provinceName=" + provinceName + ", amphurName=" + amphurName + ", districtName=" + districtName + '}';
    }
    
}
